package com.neusoft.hifly.rpc.message.domain;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;

/**
 * Title: 消息服务
 * <p>
 * Description: 站内信对象
 * <p>
 * Copyright: 2019
 * <p>
 * Company: 东软汉枫
 *
 * @author lihui
 * @version 1.0.0
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class MsgDTO implements Serializable {

	/**
	 * 消息类型
	 */
	public static final String MSG_TYPE_DEF = "msg";
	public static final String MSG_TYPE_FENCE = "fence";
	public static final String MSG_TYPE_BOX = "box";
	public static final String MSG_TYPE_WORKFLOW = "workflow";

	/**
	 * 发送类型
	 */
	public static final String SENDTYPE_EMPTY = "0";
	public static final String SENDTYPE_IM = "1";
	public static final String SENDTYPE_EMAIL = "2";
	public static final String SENDTYPE_SMS = "3";
	public static final String SENDTYPE_DINGDING = "4";

	private static final long serialVersionUID = -158268733055170L;
	// 租户编码
	private String organCode;
	// 租户逻辑ID
	private long organLogicId;
	// 逻辑ID
	private long logicId;
	// 消息标题
	private String title;
	// 消息内容
	private String content;
	// 发送类型（0站内消息/1手机短信/2电子邮件，多个逗号分隔）
	private String sendType;
	// 发送人ID
	private long userId;
	// 发送人名称
	private String userName;
	// 发送时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonDeserialize(using = LocalDateTimeDeserializer.class)
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	private LocalDateTime sendTime;
	// 消息类型
	private String type;
	// 消息打开URL地址
	private String url;
	// 业务表单的ID
	private long objId;
	// 系统编码
	private String sysCode;
	// 接收人
	private List<MsgUserVO> receiveUsers;

	public String getOrganCode() {
		return organCode;
	}

	public void setOrganCode(final String organCode) {
		this.organCode = organCode;
	}

	public long getOrganLogicId() {
		return organLogicId;
	}

	public void setOrganLogicId(final long organLogicId) {
		this.organLogicId = organLogicId;
	}

	public long getLogicId() {
		return logicId;
	}

	public void setLogicId(final long logicId) {
		this.logicId = logicId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(final String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(final String content) {
		this.content = content;
	}

	public String getSendType() {
		return sendType;
	}

	public void setSendType(final String sendType) {
		this.sendType = sendType;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(final long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(final String userName) {
		this.userName = userName;
	}

	public LocalDateTime getSendTime() {
		return sendTime;
	}

	public void setSendTime(final LocalDateTime sendTime) {
		this.sendTime = sendTime;
	}

	public String getType() {
		return type;
	}

	public void setType(final String type) {
		this.type = type;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(final String url) {
		this.url = url;
	}

	public long getObjId() {
		return objId;
	}

	public void setObjId(final long objId) {
		this.objId = objId;
	}

	public String getSysCode() {
		return sysCode;
	}

	public void setSysCode(final String sysCode) {
		this.sysCode = sysCode;
	}

	public List<MsgUserVO> getReceiveUsers() {
		return receiveUsers;
	}

	public void setReceiveUsers(final List<MsgUserVO> receiveUsers) {
		this.receiveUsers = receiveUsers;
	}

}